package com.baselibrary.test.MVP.Main9Activity.presenter;

import android.widget.ListView;

import com.baselibrary.libs.base.baseMvp.BaseP.BaseP;
import com.baselibrary.test.MVP.Main9Activity.contract.Main9Contract;
import com.baselibrary.test.MVP.Main9Activity.model.Main9Model;
import com.baselibrary.test.adapter.ssItemlistView;
import com.baselibrary.test.app.AppContext;
import com.baselibrary.test.bean.listJson;

/**
 * Created by Administrator 于萌萌
 * 创建日期: 11:35 . 2017年03月06日
 * 描述:
 * <p>
 * <p>
 * 备注:
 */
public class Main9Presenter extends BaseP<Main9Contract.View>  implements Main9Contract.Presenter {
    Main9Contract.View view ;
    Main9Model model;
    public Main9Presenter(Main9Contract.View view) {
        super(view);

    }

    @Override
    public void getV(Main9Contract.View view) {
        this.view =view;
    }

    @Override
    public void getM() {
         model = new Main9Model();
    }


    @Override
    public void getData(final ListView myList) {
        model.getData(new Main9Contract.getDatas<listJson>() {
            @Override
            public void getDatatas(listJson o) {
                ssItemlistView ssItemlistView = new ssItemlistView(AppContext.getApplication(), 0, o.data);

                myList.setAdapter(ssItemlistView);
            }
        });
    }
}
